import request from '@/utils/request.js'

export const getComments = params => {
	return request({
		url: '/v1_0/comments',
		params
	})
}

export const addCommentLike = target => {
	return request({
		method: "POST",
		url: '/v1_0/comment/likings',
		data: {
			target
		}
	})
}

export const deleteCommentLike = target => {
	return request({
		method: "DELETE",
		url: `/v1_0/comment/likings/${target}`
	})
}

export const addComment = data => {
	return request({
		method: "POST",
		url: '/v1_0/comments',
		data
	})
}
